#include "qttest0.h"
#include "aboutdialog.h"

qttest0::qttest0(QWidget *parent, Qt::WindowFlags flags)
	: QMainWindow(parent, flags)
{
	ui.setupUi(this);
	
	connect(ui.actionExit, SIGNAL(triggered(bool)), this, SLOT(close()));
	connect(ui.actionOpen, SIGNAL(triggered(bool)), ui.viewwidget, SLOT(openFile()));
	connect(ui.actionAbout, SIGNAL(triggered(bool)), this, SLOT(onAbout()));
}

qttest0::~qttest0()
{

}

void qttest0::onAbout()
{
	AboutDialog *dialog = new AboutDialog();  
	dialog->setAttribute(Qt::WA_DeleteOnClose);  
	dialog->setModal(true);  
	dialog->show();  
}
